package com.seashop.tree;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author moredln
 * @desc 金融计算工程
 * @date 2020/11/27 11:13 下午
 */
@Component
public class FinancialComputingFactory {

    @Autowired
    private Map<String, IFinancialComputing> fcMap;

    public IFinancialComputing getByCountry(String countryCode, String version) {
        if (version == null || version.isEmpty()) {
            return fcMap.get(countryCode);
        } else {
            return fcMap.get(countryCode + version);
        }
    }

}
